{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Jupyter Notebook for solving the Traveling Salesman Problem on D-Wave\n",
    "\n",
    "\n",
    "This notebook has the aim to give an example of how to solve problems in the D-Wave computer using python and the Amazon AWS Braket platform. \n",
    "\n",
    "For this case we will use the traveling salesman problem.\n",
    "\n",
    "\n",
    "This notebook is based on a example of the Amazon AWS platform. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The autoreload extension is already loaded. To reload it, use:\n",
      "  %reload_ext autoreload\n"
     ]
    }
   ],
   "source": [
    "import boto3\n",
    "from braket.aws import AwsDevice\n",
    "from braket.ocean_plugin import BraketSampler, BraketDWaveSampler\n",
    "\n",
    "import numpy as np\n",
    "import networkx as nx\n",
    "import dimod\n",
    "import dwave_networkx as dnx\n",
    "from dimod.binary_quadratic_model import BinaryQuadraticModel\n",
    "from dwave.system.composites import EmbeddingComposite\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "\n",
    "%matplotlib inline\n",
    "from collections import defaultdict\n",
    "import itertools\n",
    "\n",
    "# local imports\n",
    "from utils_tsp import get_distance, traveling_salesperson\n",
    "\n",
    "%load_ext autoreload\n",
    "%autoreload 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Amazon AWS informations \n",
    "\n",
    "bucket = f\"amazon-braket-Your-Bucket-Name\" # bucket name \n",
    "folder = \"Folder\" # folder name \n",
    "s3_infos = (bucket, folder)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "###### Information about our points \n",
    "\n",
    "To guarantee reproducibility, we are supplying the points that we use in this example, which are 6 random points distributed in space.\n",
    "\n",
    "We say reproducibility, because the arrangement of the points can interfere in the difficult of the problem, since it can increase the deep of the local minimums."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(-0.75, 37.75, 9.8, 36.2)"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO2dZ7iU1dWG70UTsWGJXcFeYkPFniiiUURBQWPB3muMQaNoYkxiRGPFjr2hRGIXscWaqInGgr1jb1/sBQvn+X6sfWQ4nDLlbXNm39c1F+XM7L3nzMya9a7yLJNEJBKJRLKhS94HiEQikUYiGt1IJBLJkGh0I5FIJEOi0Y1EIpEMiUY3EolEMiQa3UgkEsmQbnkfIBKpB/qOmjg/sBuwCtAb+BSYDFw2ZfTgj/I8W6S+sFinG4m0Td9RE/sDo4BBgIBZS378DWDAJGD0lNGDH83+hJF6IxrdSKQN+o6auD9wKtCT9kNxTcBUYOSU0YPPz+JskfolGt1IpBVKDG6vCh72NdHwRjogGt1IpAUhpHAflRncZr4GNpwyevBjiR4q0mmI1QuRyMyMwkMK1dAzPD4SaZXo6UYiJYQqhTeo3uiCx3cXj1UNkdaInm4kMiO74VUKtaCwTiQyE9HoRiIzsgozloVVw6xhnUhkJqLRjURmpHfB1ol0MqLRjURm5NOCrRPpZESjG4nMyGS806wWvgnrRCIzEY1uJDIjl+OtvVWjpqZu077+7IqEzhPpZESjG4mUMGX04A+bvvvmXjU1VVXBIElTpzzx1dtnjviHmY0wsygqFZmBaHQjkRLMbOsPxv9+LdT0Q5WP/6Zn39U2BQ4H9gVeMrMDzKyWut9IJyIa3UgEMLPZzGwscNp3776wzWcPX/tM0w/fTatwma+BkW+cNOQxSXdI2hDYGdgCeM3MfmtmcyZ99kh9EY1upOExszWBx/E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+tFUyHSOFQbXpiM15HWEmKYQdA4eKrNhvC1ShYKcbrSmHBLQ70w8NNW/n9uoJuZVWKkf/x3qd5oZ6bvqIn7z9l/63WDweuILkAv/fD9WXP03/qTLx69cVNJT1azbyjZa1metTKuxdBsXM8Kf74Tvzwj9UC1RvdyPCFSC4kJGocM+EfhVtkhvO+9PY96SWCN1u5jZtOo3LP+mBzrcCuluR471KeWjXXr3m3ujfeafZ6Be5f1HgtlZC3DA0vi4jnNnuvf8Pjrp5WcJRIpElUZ3SmjB3/Yd9TESdQmaHxbEXqzgyzk++FWNiVShO2FQVZo4/97m9k3VOhZh9tnGScWq67HDl9oo4DhJf9nuBRhy/DA3Pj0gieAe4HT8HK1KNsZ6VTU0hzR0ILG4VL2q3CrqLg/xETnoP1Ydd9WfjYPMLuZNc/FqtTL/qKSS/BQpTCI6r5YAbpITVvOsuDSB373watLM73JYCrTwwNXAiOB12IyNNIIZK69QBQ0romSZpFKk41z4x5rcw1zh0Z6ob3OGdp9vsUPrGUYYdP33+rLJydN/uQfF11DaDJQHJceaWAyUxkjChrnTouRNh0a7fm2OXrl2ZZbb64Etv6xSiUSaXSS0tONgsadkKTqsYFbpowePCSBdSKRuieRwZTBkA6PgsadjqSqBGK1QSQSSHQacDCspyS5ZiRXEq/HjkQanWqz0pHG4HI8NFQLidVjRyKdgWh0I20yZfTgD4FJeBK0GgpTjx2JFIVodCMdMRqvOqmGuq/HjkSSJhrdSLsEtbCReH11JTTXY8dqlUikhERKxiKdn1iPHYkkQzS6kbKJ9diRSO1EoxupmFiPHYlUTzS6kUgkkiExkRaJRCIZEo1uJBKJZEg0upFIJJIh0ehGIpFIhkSjG4lEIhkSjW4kEolkyP8DOztwMvRluDgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "pos = np.array([[22, 35],\n",
    "       [15,  11],\n",
    "       [ 6, 23],\n",
    "       [ 1, 12],\n",
    "       [36, 28],\n",
    "       [30, 14]])\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "adj = np.zeros((6,6))\n",
    "for i in range(6):\n",
    "    for j in range(6):\n",
    "        adj[i][j] = np.sqrt((pos[i][0]-pos[j][0])**2 + (pos[i][1]-pos[j][1])**2)\n",
    "        \n",
    "# Creating the Graph         \n",
    "G = nx.from_numpy_matrix(adj)\n",
    "# get characteristics of graph\n",
    "nodes = G.nodes()\n",
    "edges = G.edges()\n",
    "weights = nx.get_edge_attributes(G,'weight');\n",
    "\n",
    "\n",
    "nx.draw_networkx_nodes(G, pos)\n",
    "nx.draw_networkx_edges(G, pos)\n",
    "plt.axis('off')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Best Solution \n",
    "\n",
    "For the traveling salesman problem having six cities, it is possible to find the best solution by using the brute force algorithm on a classical computer. \n",
    "\n",
    "For this data, \n",
    "the best route is: $0\\rightarrow 2 \\rightarrow  3 \\rightarrow  1 \\rightarrow  5 \\rightarrow  4$. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.LineCollection at 0x7fa516fee9d0>"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deVzU1f4/8NewDioImgqlhiw6eQWGRcHSBHMpzNLUMrGUzOynplc0U7FH93oFRUFcUEkRM4FcC/WKu+DNBZVlcIGBcEE0XJA9GZjl8/vD4AuKCDPDnFnez8ejx0Md5jMveujL4/mccz48juNAC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text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Exact_route = [0, 2, 3, 1, 5, 4]\n",
    "Exact_weights = [(Exact_route[i], (Exact_route[(i+1)%6])) for i in range(6)]\n",
    "G_best = nx.from_edgelist(Exact_weights)\n",
    "\n",
    "nx.draw_networkx_nodes(G_best, pos)\n",
    "nx.draw_networkx_edges(G_best, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Going Quantum\n",
    "\n",
    "Now, let us try to solve it on the D-Wave quantum annealer: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [],
   "source": [
    "# get QUBO for TSP\n",
    "tsp_qubo = dnx.algorithms.tsp.traveling_salesperson_qubo(G)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Default Lagrange parameter: 134.61352242087915\n"
     ]
    }
   ],
   "source": [
    "#Here we will look for the Best Lagrange parameters. The Ocean documentation says that good values can found between 75-150%.\n",
    "\n",
    "\n",
    "lagrange = None\n",
    "weight='weight'\n",
    "\n",
    "# get corresponding QUBO step by step\n",
    "N = G.number_of_nodes()\n",
    "\n",
    "if lagrange is None:\n",
    "    # If no lagrange parameter provided, set to 'average' tour length.\n",
    "    # Usually a good estimate for a lagrange parameter is between 75-150%\n",
    "    # of the objective function value, so we come up with an estimate for \n",
    "    # tour length and use that.\n",
    "    if G.number_of_edges()>0:\n",
    "        lagrange = G.size(weight=weight)*G.number_of_nodes()/G.number_of_edges()\n",
    "    else:\n",
    "        lagrange = 2\n",
    "\n",
    "print('Default Lagrange parameter:', lagrange)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Lagrange parameter for HPO: [121, 126, 131, 136, 141, 146, 151, 156]\n"
     ]
    }
   ],
   "source": [
    "# create list of possible good lagrange parameters \n",
    "lagrange_pars = list(np.arange(int(0.9*lagrange), int(1.2*lagrange), 5))\n",
    "print('Lagrange parameter for HPO:', lagrange_pars)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Running quantum annealing for TSP with Lagrange parameter= 121\n",
      "Route found with D-Wave: [0, 5, 2, 3, 4, 1]\n",
      "Total distance (without return): 125.6895372457917\n",
      "Total distance (including return): 150.6895372457917\n",
      "Running quantum annealing for TSP with Lagrange parameter= 126\n",
      "Route found with D-Wave: [0, 3, 4, 1, 5, 2]\n",
      "Total distance (without return): 137.57616776352612\n",
      "Total distance (including return): 157.57616776352612\n",
      "Running quantum annealing for TSP with Lagrange parameter= 131\n",
      "Route found with D-Wave: [0, 3, 1, 2, 5, 4]\n",
      "Total distance (without return): 101.04404930009348\n",
      "Total distance (including return): 116.69652514259201\n",
      "Running quantum annealing for TSP with Lagrange parameter= 136\n",
      "Route found with D-Wave: [0, 1, 2, 3, 5, 4]\n",
      "Total distance (without return): 96.38347589281966\n",
      "Total distance (including return): 112.03595173531819\n",
      "Running quantum annealing for TSP with Lagrange parameter= 141\n",
      "Route found with D-Wave: [0, 4, 5, 1, 3, 2]\n",
      "Total distance (without return): 72.29979541621748\n",
      "Total distance (including return): 92.29979541621748\n",
      "Running quantum annealing for TSP with Lagrange parameter= 146\n",
      "Route found with D-Wave: [0, 1, 2, 3, 5, 4]\n",
      "Total distance (without return): 96.38347589281966\n",
      "Total distance (including return): 112.03595173531819\n",
      "Running quantum annealing for TSP with Lagrange parameter= 151\n",
      "Route found with D-Wave: [0, 5, 2, 3, 4, 1]\n",
      "Total distance (without return): 125.6895372457917\n",
      "Total distance (including return): 150.6895372457917\n",
      "Running quantum annealing for TSP with Lagrange parameter= 156\n",
      "Route found with D-Wave: [0, 1, 5, 3, 2, 4]\n",
      "Total distance (without return): 111.8628008733613\n",
      "Total distance (including return): 127.51527671585983\n",
      "---FINAL SOLUTION---\n",
      "Best solution found with D-Wave: [0, 4, 5, 1, 3, 2]\n",
      "Total distance (including return): 92.29979541621748\n"
     ]
    }
   ],
   "source": [
    "# run TSP with imported TSP routine\n",
    "# For using the D-Wave 2000Q use \n",
    "#sampler = BraketDWaveSampler(s3_folder,'arn:aws:braket:::device/qpu/d-wave/DW_2000Q_6')\n",
    "\n",
    "sampler = BraketDWaveSampler(s3_folder,'arn:aws:braket:::device/qpu/d-wave/Advantage_system1')\n",
    "sampler = EmbeddingComposite(sampler)\n",
    "\n",
    "# set parameters\n",
    "num_shots = 500\n",
    "start_city = 0\n",
    "best_distance = sum(weights.values())\n",
    "best_route = [None]*len(G)\n",
    "\n",
    "# run HPO to find route\n",
    "for lagrange in lagrange_list:\n",
    "    print('Running quantum annealing for TSP with Lagrange parameter=', lagrange)\n",
    "    route = traveling_salesperson(G, sampler, lagrange=lagrange, \n",
    "                                  start=start_city, num_reads=num_shots, answer_mode=\"histogram\")\n",
    "    # print route \n",
    "    print('Route found with D-Wave:', route)\n",
    "    \n",
    "    # print distance\n",
    "    total_dist, distance_with_return = get_distance(route, adj)\n",
    "    \n",
    "    # update best values\n",
    "    if distance_with_return < best_distance:\n",
    "        best_distance = distance_with_return\n",
    "        best_route = route\n",
    "\n",
    "print('---FINAL SOLUTION---')\n",
    "print('Best solution found with D-Wave:', best_route)\n",
    "print('Total distance (including return):', best_distance)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Discussion \n",
    "\n",
    "It was possible to find the best solution of the problem with six cities, as experiment result shows. \n",
    "However, it is possible to run larger problems in the D-Wave quantum computer, but as larger as the problem gets, harder will be to find good solutions, since the TSP demands too much quibts.\n",
    "\n",
    "\n",
    "Note that the solution we find here is not exactly the same we wrote above, but they are completely symmetric. \n",
    "\n",
    "## Explaning the parameters\n",
    "\n",
    "### Lagrange parameter \n",
    "The Lagrange parameter can increase or decrease the intensity of the penalty constraints\n",
    "\n",
    "### Annealing time\n",
    "The annealing time we did not change, but it is possible. \n",
    "We can pass \"annealing_time = annealing_time\"  as argument. \n",
    "Also we can change the annealing schedule, as it is explained in the ocean documentation. \n",
    "\n",
    "\n",
    "### Some others considerations \n",
    "We could also formulate this problem as just a simple QUOBO model, which means that it is not necessary to use the TSP functions. \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.LineCollection at 0x7fa517955d50>"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deVzU1f4/8NewDioImgqlhiw6eQWGRcHSBHMpzNLUMrGUzOynplc0U7FH93oFRUFcUEkRM4FcC/WKu+DNBZVlcIGBcEE0XJA9GZjl8/vD4AuKCDPDnFnez8ejx0Md5jMveujL4/mccz48juNACCFEM4xYByCEEENCpUsIIRpEpUsIIRpEpUsIIRpEpUsIIRpk0tyLr7zyCmdvb6+hKIQQoh/S09OLOY7r0tRrzZauvb090tLS2iYVITqkuKoG+9LvQny/AhUSGaz4JhDYWmGCZ3d07mDOOh7RMjwer+BFrzVbuoQYuqzCMmxMyceZvEcAgBqZov41vsl9RJ7Mg2+fLpg5xAluPaxZxSQ6hEqXkBeIS72NkCQxJDI5mtpDJPm7gI9nP8D/8ooR7C/AZB97zYYkOodKl5AmPC3cHFRLFS/9Wo4DqqVyhCTlAAAVL2kWrV4g5BlZhWUISRK3qHAbqpYqEJIkxpW7ZW2UjOgDKl1CnrExJR8SmVyp90pkcmx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hqO712BzH4c6dO89ND5SWlsLNzQ3u7u7w8/NDUFAQ+vbtC3Nz9r9HCFEnpc9e0NQISB8pFApUVlY2WdgvG11XVVXB0tJSqflrS0vLVv0TXB3/ojE1AuY7lSLvakb9JgM+n9/ocBehUAgHBwe6GUr0RpsdeNOaub46Tw80foPOXlCSXC5HeXl5i6ZAnv25RCKBtbV1i0v6dJExEq6Wo1au/HOxIKtFz/KrGOVoXr/RoFu3bur7H0KIFmqzA2/oQGPNq5tH7tSpU6vfW1tbW3/DsamiLiwsRFZWVv2v/2k/AvLuHqoFNjGD5zsf4LtPhKpdhxA9ofJ6GjrQWHeYmZmha9eu6Nq1a4u+/osdl3Fa/FDlz62QSFW+BiH6Qi2LGF27WyN6shcdaKxn1LUe24qvGys1CNEEta4c79zBnM5S0CNtsR6bEENHt4vJC4337K7yNTgA4z1Uvw4h+oJKl7xQ3XpsZTd6adN6bEK0BZUuadYsXyfwTZTbjME3McZMXyc1JyJEt1Hpkma59bBGsL8AFqat+63ydD22gFarEPIMOoKJvBStxyZEfah0SYvQemxC1INKl7QYrccmRHXNnr3A4/EeASjQXBxCCNELr3Mc1+QzoJotXUIIIepFqxcIIUSDqHQJIUSDqHQJIUSDqHQJIUSDqHQJIUSD/j/QCrlHQONo8gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "best_weights = [(best_route[i], (best_route[(i+1)%6])) for i in range(6)]\n",
    "G_bestDW = nx.from_edgelist(best_weights)\n",
    "\n",
    "nx.draw_networkx_nodes(G_bestDW, pos)\n",
    "nx.draw_networkx_edges(G_bestDW, pos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
